# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=sregex
pkgver=0.0.1
pkgrel=1
pkgdesc="A NFA/DFA-based regex engine matching on large data streams"
url="https://github.com/openresty/sregex"
# armv7 - tests failed
arch="all !armv7"
license="BSD-3-Clause"
checkdepends="
	perl-ipc-run3
	perl-pathtools
	perl-test-base
	perl-test-harness-utils
	perl-test-longstring
	"
subpackages="$pkgname-dev"
source="https://github.com/openresty/sregex/archive/v$pkgver/sregex-$pkgver.tar.gz
	disable-broken-tests.patch
	"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	make PREFIX=/usr
}

check() {
	prove -I. t
}

package() {
	make install PREFIX=/usr DESTDIR="$pkgdir"
}

dev() {
	default_dev

	amove usr/bin/sregex-cli
}

sha512sums="0c4894a21854f5ec443a2decb9c0f91bff22299695969b27340ce32716c70802ef8835fe0357ddedebc4881fc67675bfe07291ce6734d46dab4c22110217173c  sregex-0.0.1.tar.gz
3fe47b81852405106908a6c99f16e16771cfaf028f1d3bfb412ff53109ddb79d6ca7f3190e8a55957bd8c91da5a6e3afb0a7e5ab2143563cf6d4efdfd64b35ad  disable-broken-tests.patch"
